#define BOOST_TEST_MODULE fix
#include <boost/test/unit_test.hpp>
#include <iostream>

struct SF {
   SF() : j( 0 ) { BOOST_TEST_MESSAGE( "setup suite fixture" ); }
   ~SF()         { BOOST_TEST_MESSAGE( "teardown suite fixture" ); }

   int j;
};


struct TF {
   TF() : i( 0 ) { BOOST_TEST_MESSAGE( "setup test fixture" ); }
   ~TF()         { BOOST_TEST_MESSAGE( "teardown test fixture" ); }

   int i;
};

struct MyConfig {
   MyConfig(): l(0)   { std::cout << "global setup\n"; }
   ~MyConfig()  { std::cout << "global teardown\n"; }
   int l;
};

BOOST_GLOBAL_FIXTURE( MyConfig );

BOOST_FIXTURE_TEST_SUITE(test_suite, SF)

BOOST_FIXTURE_TEST_CASE( test_case1, TF )
{
   BOOST_CHECK( i == 1 );
   ++i;
}

BOOST_AUTO_TEST_CASE(test_case2)
{
   BOOST_CHECK(j == 1);
   j++;
}

BOOST_AUTO_TEST_SUITE_END()

